/* 切换主题 */
function changeTheme() {
    if ($.cookie("theme") == "light") {
        $.cookie("theme", "dark", {
            expires: 30,
            path: "/",
            domain: "cnblogs.com",
        });
        document.documentElement.setAttribute("theme", "dark");
    } else {
        $.cookie("theme", "light", {
            expires: 30,
            path: "/",
            domain: "cnblogs.com",
        });
        document.documentElement.removeAttribute("theme", "dark");
    }
};
/* 侧边开关 */
function sidebarToggle() {
    $("body").toggleClass("main-widthout-sidebar");
};

/* 侧边显示 */
function showSide() {
    $("#sideBar").removeClass("content-active");
    $("#sideBar").addClass("side-active");
    $("#sideBar").scrollTop(0);
};

/* 目录显示 */
function showContent() {
    $("#sideBar").removeClass("side-active");
    $("#sideBar").addClass("content-active");
    //contentScroll();

};

window.changeTheme = changeTheme;
window.sidebarToggle = sidebarToggle;
window.showSide = showSide;
window.showContent = showContent;
